import request from '@/utils/request'

// export const loginApi = (data) => {
//   request({
//     url: 'http://localhost:8888/api/sys/login',
//     method: 'post',
//     data
//   })
// }

export const loginApi = data => request.post('/sys/login', data)

export const getUserInfoApi = () => {
  return request({
    url: `/sys/profile`,
    method: 'post'
  })
}
/** *
 * 获取用户的基本信息  现在写它 完全是为了显示头像
 * **/
export const getBaseUserInfoApi = (id) => {
  return request({
    url: `/sys/user/${id}`,
    method: 'get'
  })
}
